/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.space.regional.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuyao.cloud.common.core.util.R;
import com.fuyao.cloud.space.entity.RoomLand;
import com.fuyao.cloud.space.entity.RoomRegional;
import com.fuyao.cloud.space.vo.ExcelImportRegionalVO;
import com.fuyao.cloud.space.vo.ExcelRegionalVO;
import org.springframework.validation.BindingResult;

import java.io.Serializable;
import java.util.List;

/**
 * 区域管理
 *
 * @author liyue
 * @date 2021-11-09 15:09:42
 */
public interface RoomRegionalService extends IService<RoomRegional> {

	/**
	 * 查询所有空间树
	 *
	 * @return 树信息
	 */
	List<Tree<Long>> selectTree();


	/**
	 * 获取土地树型结构
	 *
	 * @return 土地树结构
	 */
	List<Tree<Long>> selectLandTree();

	/**
	 * 导出方法
	 * @param fyRoomRegional 区域对象
	 * @return 区域列表
	 */
	List<ExcelRegionalVO> listRegional(RoomRegional fyRoomRegional);

	/**
	 * 导入区域信息
	 * @param excelVOList 导入列表
	 * @param bindingResult 绑定返回对象
	 * @return R
	 */
	R importRegional(List<ExcelImportRegionalVO> excelVOList, BindingResult bindingResult);


	/**
	 * 根据编码加载区域信息
	 * @param code 编码
	 * @return 区域列表
	 */
	List<RoomRegional> getByCode(String code);

	/**
	 * 根据 土地id 查询区域集合
	 * @param roomLandIds  土地管理IDs
	 * @return 区域集合
	 */
	List<RoomRegional> listByRoomLandId(List<Long> roomLandIds);

	List<RoomRegional> getByParentId(Serializable id);

	/**
	 * 批量删除
	 * @param ids
	 * @return
	 */
	R batchDelete(List<Long> ids);
}
